<template>
    <view class="layout">
        <a-header />
        <a-swiper :data="banners" />
        <category-recommend v-bind="home.area" />
        <category-recommend v-bind="home.style" />
    </view>
</template>

<script setup lang="ts">
import ASwiper from "@/components/a-swiper/a-swiper.vue";
import AHeader from "@/components/a-header/a-header.vue";
import categoryRecommend from "./category-recommend.vue";
import { getHomeDataAPI } from "@/api";

const title = ref("Hello");

const banners = [
    "/static/img/banner/b1.png",
    "/static/img/banner/b2.jpg",
    "/static/img/banner/b3.jpg",
    "/static/img/banner/b4.png"
];

const home = ref<any>({});

const getList = async () => {
    const res = await getHomeDataAPI();
    home.value = res;
};

onMounted(() => {
    getList();
});
</script>

<style></style>
